﻿<Window x:Class="StackHash.PluginSettings"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Plugin Settings - StackHash" Height="450" MinHeight="450" Width="400" MinWidth="400" Icon="/StackHash;component/StackHash.ico" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" Closed="Window_Closed">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="MasterResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Window.CommandBindings>
        <CommandBinding Command="Help" x:Name="commandBindingHelp" Executed="commandBindingHelp_Executed" />
    </Window.CommandBindings>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <ScrollViewer Margin="10" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ItemsControl Name="itemsControlSettings" Grid.IsSharedSizeScope="True">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="170" SharedSizeGroup="Name" />
                                <ColumnDefinition Width="175" SharedSizeGroup="Value" />
                            </Grid.ColumnDefinitions>

                            <TextBlock Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Name, Mode=OneWay}" />

                            <TextBox Margin="3" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Text="{Binding Value, Mode=TwoWay}" />

                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>

        <Border Grid.Row="1" Style="{StaticResource ButtonBorder}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <Button Margin="10" Command="Help" Name="buttonPluginHelp">Plugin _Help</Button>

                <StackPanel Margin="7" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Margin="3" Name="buttonOK" IsDefault="True" Click="buttonOK_Click">OK</Button>
                    <Button Margin="3" IsCancel="True">Cancel</Button>
                </StackPanel>
            </Grid>
        </Border>

    </Grid>
</Window>
